package exam.xiaohongshu.S2;

import java.util.*;

public class Main {

    public static int n;
    public static long[] nums;
    public static long K;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
        K = sc.nextLong();
        nums = new long[n];
        for (int i=0; i<n; ++i) {
            nums[i] = sc.nextLong();
        }
        System.out.println(solution());
    }

    private static int solution() {
        if (n == 1)
            return 0;
        Arrays.sort(nums);
        int res = 0;
        for (int i=0; i<nums.length-1; ++i) {
            int bound = lowerBound(i + 1, nums.length - 1, nums[i]);
            if (bound > 0) {
                res += (n - bound);
            }
        }
        return res * 2;
    }

    private static int lowerBound(int left, int right, long cur) {
        while (left < right) {
            int mid = left + (right - left) / 2;
            long prod = cur * nums[mid];
            if (prod < K)
                left = mid + 1;
            else {
                right = mid;
            }
        }
        if (cur * nums[left] < K)
            return -1;
        return left;
    }
}
